<?php
use \sy\lib\YHtml;
?>
<!DOCTYPE html>
<html>
<head>
	<title>登录</title>
	<meta name="_csrf_token" content="<?=$_csrf_token?>">
	<?php
	echo Sy::view('common/header_login');
	if (is_string($css)) {
		echo YHtml::css($css);
	}
	?>
</head>
<body>
	<div class="wrapper" style="width:<?=$width?>px">
		<div class="logined">
			<p><img class="avatar"></p>
			<p><span>3</span>秒后自动登录</p>
			<p><button id="useOther" class="button">使用其他账号登陆</button></p>
		</div>
		<div class="login-form">
			<input id="user" type="text" class="text" placeholder="用户名">
			<input id="password" type="password" class="text" placeholder="密码">
			<button id="submit" class="button">登录</button>
			<p>
			<?php
			foreach ($oauth['enable'] as $o) {
				echo '<a class="oauth" data-url="', Sy::createUrl(['oauthclient/redirect', 'client' => $o]), '">', $oauth[$o]['name'], '</a>';
			}
			?>
			</p>
		</div>
	</div>
	<script>
	window.eu = {
		"login": "<?=Sy::createUrl('user/login', 'json')?>",
		"callback": "<?=$callback?>",
		"isLogin": <?=$isLogin?>,
		"uid": "<?=$uid?>",
		"appid": "<?=addslashes($appid)?>"
	}
	</script>
	<?=Sy::view('common/footer')?>
</body>
</html>